# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=cpd
pkgver=0.5.1
pkgrel=1
pkgdesc="C++ implementation of the Coherent Point Drift point set registration algorithm."
url="https://github.com/gadomski/cpd"
arch="all !armv7 !mips !mips64" # Fails to get checksum
license="GPL-2.0-or-later"
makedepends="cmake eigen-dev fgt-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/gadomski/$pkgname/archive/v$pkgver.tar.gz"

build() {
	mkdir build && cd build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DWITH_TESTS=OFF \
		-DBUILD_SHARED_LIBS=ON \
		-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

sha512sums="19552ae103b4a0290f4c3af170ae602fee2d8a7ac73d83d05658086484f74bbe3b841b006c9013103cb4ff953462ce96607e87522b8bca9f7ff1c22857452ce4  cpd-0.5.1.tar.gz"
